package com.groupbuying.settleproducer.connector;

import com.groupbuying.settleproducer.utils.R;
import com.groupbuying.settleproducer.utils.apiresult.ApiResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @Author cuich
 * @Description 调用商户中心接口
 * @Date 2019/5/10 10:07
 **/
@Service
@FeignClient("bus-store")
public interface StoreFeign {
    //通过商户的门店id获取商户对应的银行信息
    //@RequestMapping(value = "/shop/getStoreBankInfo", method = RequestMethod.POST)
    @PostMapping("/shop/getStoreBankInfo")
    R getBankByStoreUuid(@RequestParam Map<String, Object> params);

    // 获取商户ID
    @RequestMapping(value = "/counter/getStoreIdAndRuleIdByCounterId", method = RequestMethod.GET)
    Map<String,Object> getMerchantsId(@RequestParam Map<String, Object> params);

    // 冻结或解冻商户金额
    @RequestMapping(value = "/storeVirtualAccount/freezeOrUnFreezeVirtualMoney", method = RequestMethod.GET)
    Map<String,Object> freezeOrUnFreezeVirtualMoney(@RequestParam Map<String, Object> params);

    // 处理商户冻结金额
    @RequestMapping(value = "/storeVirtualAccount/dealFreezeVirtulaMoney", method = RequestMethod.GET)
    Map<String,Object> dealFreezeVirtulaMoney(@RequestParam Map<String, Object> params);

    //通过收银台Id获取商户金融密码
    @RequestMapping(value = "/storeVirtualAccount/virtualAccountPassword", method = RequestMethod.GET)
    ApiResult virtualAccountPassword (@RequestParam("counterId")String counterId);
}
